package com.wms.controller;

import com.wms.bean.ResultBean;
import com.wms.core.R;
import com.wms.service.GoodsBatchService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "批次号")
public class GoodsBatchController {
    @Autowired
    GoodsBatchService goodsBatchService;

    @PutMapping("/batch")
    public ResultBean setBatch(@RequestParam List<Integer> purchaseDids){
        int res=goodsBatchService.setGoodsBatch(purchaseDids);
        return res>0? R.success("设置成功"):R.fail("设置失败");
    }
}
